﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Reflection;

namespace Ricciolo.StylesExplorer.Forms
{
    public partial class FindAssemblyDialog : Ricciolo.StylesExplorer.Forms.BaseDialog
    {
        public FindAssemblyDialog(AssemblyName name, string baseDir)
        {
            InitializeComponent();

            this.openFileDialog.InitialDirectory = baseDir;
            this.openFileDialog.FileName = name.Name + ".dll";
            this.locationLabel.Text = name.FullName;
        }

        private void browseButton_Click(object sender, EventArgs e)
        {
            if (openFileDialog.ShowDialog(this) == DialogResult.OK)
                this.assemblyLocation.Text = openFileDialog.FileName;
        }

        public string AssemblyLocation
        {
            get { return assemblyLocation.Text; }
        }
    }
}
